
package com.tools.cleanmaster.ui.view;

import android.content.Context;
import android.view.Gravity;
import android.widget.Toast;

@SuppressWarnings("static-access")
public class ToastHelper {
    public static Toast create(Context context, CharSequence text, int duration) {
        return Toast.makeText(context, text, duration);
    }

    public static Toast create(Context context, int resId, int duration) {
        return create(context, context.getText(resId), duration);
    }

    public static Toast create(Context context, CharSequence text, int duration, int y) {
        Toast toast = create(context, text, duration);
        toast.setGravity(Gravity.TOP, 0, y);
        return toast;
    }
}
